package com.woniu.liuzhougov.itemAndTask.utils;

import com.woniu.liuzhougov.authorityControl.pojo.User;
import com.woniu.liuzhougov.itemAndTask.pojo.Item;
import com.woniu.liuzhougov.itemAndTask.pojo.ItemTask;
import com.woniu.liuzhougov.itemAndTask.pojo.Supervision;
import com.woniu.liuzhougov.systemSettings.pojo.Log;

/**
 * @author wyz02
 * @version 1.0
 * @ClassName TaskUtil
 * @Description: 提供子任务模块需要封装对象的方法
 * @date 2019/4/28 20:12
 */
public class TaskUtil {
    /*
     **
     * @Author Wuyuzhong
     * @Description 封装督办单对象
     * @Date 2019/4/28 17:32
     * @Param []
     * @return com.woniu.liuzhougov.itemAndTask.pojo.Supervision
     **/
    public static Supervision getSupervision(User founder, User reciever, Item item,
                                      String supervisionContent, ItemTask itemTask){
        Supervision supervision = new Supervision();

        supervision.setSupervisionFounder(founder);

        supervision.setSupervisionRecender(reciever);
        supervision.setSupervisionItem(item);
        supervision.setItemTask(itemTask);
        supervision.setSupervisionContent(supervisionContent);

        return supervision;
    }
    
    /*
    **
     * @Author Wuyuzhong
     * @Description 提供日志类封装对象的方法
     * @Date 2019/4/28 20:15
     * @Param []
     * @return com.woniu.liuzhougov.systemSettings.pojo.Log
     **/
    public static Log getLog(Integer itemId,String opration,Integer userId){
        Log log = new Log();
        log.setUserId(userId);
        log.setItemId(itemId);
        log.setLogOperation(opration);
        
        return log;
    }
}
